﻿@{
    
}

<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="gb2312" />
        <title>會長講經 -- 觀無量壽佛經</title>
    </head>
    <body>
        <article class="article">
            @{             
                var chapters = new System.Data.DataSet();
                chapters.ReadXmlSchema(Server.MapPath("~/App_Data/PuXianXingYuanPingAudioIndex.xsd"));
                chapters.ReadXml(Server.MapPath("~/App_Data/GuanWuLiangShouJingAudioIndex.xml"));
                foreach(System.Data.DataTable table in chapters.Tables)
                {
                    if (table.Columns.Count > 5)
                    {
                        // Header of the chapters.
                        foreach(System.Data.DataRow row in table.Rows)
                        {
                            <header>
                                <div class="booktilte">@row["Title"]</div>
                                <div class="author">@row["Author"]</div>
                                <div class="datetime">@row["CreatedTime"]</div>
                           </header>
                        }
                    }
                    else
                    {
                        <div id="MultiColumnList">
                        <ol>
                            @{
                                // Chapter Lists.
                                foreach (System.Data.DataRow row in table.Rows)
                                {
                                    <!--<li><a href=@row["Link"]>@row["Name"]</a></li>-->
                                   <li><a href="PlayAudios.cshtml?url=@row["Link"]">@row["Name"]</a></li>
                                }
                            }
                        </ol>
                        </div>
                    }
                }
            } 
        </article>
    </body>
</html>
